package cn.da.shuai.cool.finance.model;

import cn.da.shuai.cool.common.entity.EntityBase;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * <p>
 * 总账表
 * </p>
 *
 * @author 大帅哥
 * @since 2023-05-01
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cool_general_ledger")
public class CoolGeneralLedger extends EntityBase {

    private static final long serialVersionUID = 1L;

    /**
     * 凭证号
     */
    @TableField("voucher_no")
    private String voucherNo;

    /**
     * 科目编码
     */
    @TableField("account_code")
    private String accountCode;

    /**
     * 科目名称
     */
    @TableField("account_name")
    private String accountName;

    /**
     * 借方金额
     */
    @TableField("debit_amount")
    private BigDecimal debitAmount;

    /**
     * 贷方金额
     */
    @TableField("credit_amount")
    private BigDecimal creditAmount;

    /**
     * 交易日期
     */
    @TableField("transaction_date")
    private LocalDate transactionDate;

    /**
     * 会计期间
     */
    @TableField("accounting_period")
    private String accountingPeriod;

    /**
     * 描述
     */
    @TableField("description")
    private String description;

    /**
     * 参考单号
     */
    @TableField("reference_no")
    private String referenceNo;

    /**
     * 业务类型
     */
    @TableField("business_type")
    private String businessType;

    /**
     * 状态（0-未过账，1-已过账）
     */
    @TableField("status")
    private Integer status;

    /**
     * 制单人ID
     */
    @TableField("created_by")
    private Long createdBy;

    /**
     * 审核人ID
     */
    @TableField("approved_by")
    private Long approvedBy;

    /**
     * 审核时间
     */
    @TableField("approved_time")
    private LocalDate approvedTime;
}